package com.hphs.controller;

import com.hphs.model.CarProduct;
import com.hphs.model.ProductQuery;
import com.hphs.model.VideoQuery;
import com.hphs.model.Videos;
import com.hphs.service.CarProductService;
import com.hphs.service.CarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/goods")
@CrossOrigin
public class CarProductController {
    @Autowired
    private CarProductService service;

    @GetMapping
    public List<CarProduct> select(ProductQuery query){
        List<CarProduct> select = service.select(query);
        return select;
    }


}
